<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bar</title>
</head>
<body>
    <!--topbar-->
    <nav class="navbar navbar-dark bg-dark sticky-top flex-md-nowrap p-0" th:fragment="topbar">
        <div class="container-fluid">
            <div class="col-sx-2 col-sm-2 col-md-2 col-lg-2 mr-0">
                <a class="navbar-brand btn-lucency" href="main.html" th:href="@{/main}">
                    <i class="fa fa-fighter-jet"></i>&ensp;[[#{dronesystem.name}]]
                </a>
            </div>
            <div class="col-sx-7 col-sm-7 col-md-7 col-lg-7 mr-0">
                <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search"/>
            </div>
            <div class="col-sx-1 col-sm-1 col-md-1 col-lg-1 mr-0">
                <button style="color: white" type="button" class="btn-lucency">
                    <i class="fa fa-search"></i>&ensp;[[#{btn.search}]]
                </button>
            </div>
            <div class="col-sx-1 col-sm-1 col-md-1 col-lg-1 mr-auto">
                <div class="nav-item dropdown">
                    <a style="color: white" class="nav-link dropdown-toggle" href="#" id="user-dropdown" 
                        data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="fa fa-user-circle"></i>&ensp;[[${session.loginUser}]]
                    </a>
                    <div class="dropdown-menu" aria-labelledby="user-dropdown">
                      <a class="dropdown-item" href="#">[[#{user.info}]]</a>
                      <a class="dropdown-item" href="#">[[#{btn.quit}]]</a>
                    </div>
                </div>
            </div>
        </div>
    </nav>

    <!--sidebar-->
    <nav class="col-md-2 d-none d-md-block bg-light sidebar" id="sidebar">
        <div class="sidebar-sticky">
            <ul class="nav flex-column">
                <li class="nav-item">
                    <a class="nav-link active"
                    th:class="${activeUri=='main'?'nav-link active':'nav-link'}"
                    href="#" th:href="@{/main}">
                        <i class="fa fa-home"></i>
                        [[#{menu.homepage}]]
                        <!-- 可以被屏幕阅读器读取但不会显示 -->
                        <span class="sr-only">(current)</span>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link"
                    th:class="${activeUri=='userlist'?'nav-link active':'nav-link'}"
                    href="user/list.html"  th:href="@{/main/users}">
                        <i class="fa fa-user"></i>
                        [[#{menu.user.control}]]
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link"
                    th:class="${activeUri=='sitelist'?'nav-link active':'nav-link'}"
                    href="site/list.html"  th:href="@{/main/sites}">
                        <i class="fa fa-globe"></i>
                        [[#{menu.site.control}]]
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link"
                    th:class="${activeUri=='dronelist'?'nav-link active':'nav-link'}"
                    href="drone/list.html"  th:href="@{/main/drones}">
                        <i class="fa fa-plane"></i>
                        [[#{menu.drone.control}]]
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link"
                    th:class="${activeUri=='boxlist'?'nav-link active':'nav-link'}"
                    href="box/list.html"  th:href="@{/main/boxs}">
                        <i class="fa fa-archive"></i>
                        [[#{menu.box.control}]]
                    </a>
                </li>
            </ul>
        </div>
    </nav>

    
</body>
</html>